Repository navigation
fix: apply configured thinking levels through V2 - #279
Merged
hffmnnj merged 3 commits intoAug 3, 2026
Merged
Conversation
…ordering - applyThinkingLevelsToAgents now sets agent.model.variant for honest string resolutions (id-only V2 matches) instead of silently discarding them. No headers/body are fabricated for a string apply. - captureCatalogCapabilities builds a fresh Map per refresh and the shared reference is swapped only after full population, replacing the previous clear-then-repopulate-in-place pattern. A reentrant agent transform racing a catalog refresh now always observes a complete snapshot. - registerThinkingLevelAgentTransform deduplicates the initial-registration and reload code paths through a shared refresh() closure; behavior is unchanged (catalog transform before agent transform, in both paths). Tests: 3 new cases covering the string-apply path, the unsupported-level warning path, and reentrancy/capture-ordering safety. All prior hooks-v2 coverage (full-variant merge, live reload rerun) passes unchanged.
Add a redacted real-shape parity fixture to dual-contract.test.ts asserting that equivalent V1 (capabilities.reasoning + options) and real-shape V2 (reasoning + reasoning_options effort) host payloads produce the same supported thinking-level set through the shared resolveCapabilities extractor, and that every canonical label resolves on both contracts. Add a defensive V1 chat.params test to agent-registration.test.ts documenting the precise posture when the catalog exposes only the real-shape effort options: resolveCapabilities classifies it as a V2 id-only match, getVerifiedV1RequestOption returns undefined, and the hook emits the documented 'no unambiguous V1 request option' diagnostic while preserving the provider default. The V2 adapter handles the same shape via the string apply path. agent-registration.ts is deliberately untouched: the new V1 test passes green on first run, proving the Wave 1 shared extraction change does not break V1. No speculative source edit (ADL Rule 4). Verification: - dual-contract.test.ts: 15 pass, 0 fail, 66 expect() calls - agent-registration.test.ts: 13 pass, 0 fail, 23 expect() calls - features/setup/: 93 pass, 0 fail, 259 expect() calls (non-regression) - typecheck: clean; lint: 0 warnings in edited files
…real-shape catalog Add the Pattern 4 wiring proof for the live host capability shape that caused the original defect: a catalog publishing reasoning:true + reasoning_options (no variants). A configured agentThinkingLevels value for a goop-* role reaches the V2 consumer, sets agent.model.variant without a preserve-default warning and without fabricated headers/body, and changing the configured level changes the applied variant on reload. Document the reasoning_options-vs-variants catalog gotcha in AGENTS.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agent.model.variantVerification